<div class="mdui-container">
    <h2>您未登录{$text}!<span id="sp">3</span>秒后跳转至登录界面</h2>
</div>
<script type="text/javascript">
$(document).ready(function(){
    setInterval(function() {
        x--;
        if (x>0) {
            $("#sp").text(x);
        } else {
            location.href = '/login';
        }
    },1000);
});
var x = 3;
</script>